package com.bailian.spring.ioc.basic_dl.dl_type;

import com.bailian.spring.ioc.basic_dl.dl_type.dao2.DemoDao2;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Map;

/**
 * @author gaoxu
 * date: Created on 2021/10/28 下午5:11
 */
public class OfTypeApplication {
    public static void main(String[] args) {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("basic_dl/quickstart-bytype.xml");
        Map<String, DemoDao2> beans = ctx.getBeansOfType(DemoDao2.class);
        beans.forEach((beanName, bean) -> {
            System.out.println(beanName + " : " + bean.toString());
        });

    }
}
